/*
 * lcd.h
 *
 *  Created on: Mar 21, 2011
 *      Author: Vishal Verma
 */

#ifndef LCD_H_
#define LCD_H_

#define TRUE 1
#define FALSE 0

#define LCD_RW P1_2
#define LCD_RS P1_3
#define RS_DATA 1
#define RS_CMD 0
#define RW_WRITE 0
#define RW_READ 1
#define LCD_BUSY P0_7
#define LCD_ADDR 0x8000
#define LCD_PORT lcdPtr

#define LCDHOME 0x80
#define LCD0OFFSET 0x00
#define LCD1OFFSET 0x40
#define LCD2OFFSET 0x10
#define LCD3OFFSET 0x50

#define TESTPIN P3_5
#define ON 1
#define OFF 0


void init_lcd(void);
void wr_lcdReg(char command);
void wr_lcdDat(char ascii);
void chkBusy(void);
void lcdgotoaddr (unsigned char addr);
void lcdgotoxy (unsigned char row, unsigned char col);
void lcdputstr (char *string);
void lcdputch (char ch);
void clrLcd (void);


#endif /* LCD_H_ */
